STEP 9: play_game() will create random sprites on the screen. Let's get a list from which to choose them!

my_dictionary.keys() returns a list [ ] of every key inside a dictionary.

  • In LOGIC, go to and drag Get Keys indented and inside play_game().
  • Change both (there are two!) instances of the variable keys to image_list.
  • Click Run and press Console. What do you see printed to the console?

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)